/**
 * @author : cww
 * @date : 2021/1/11 22:49
 */
public class Chess {
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    private String state;
    private String color;
    private int x;
    private int y;
    public Chess(String color){
        this.color = color;
        this.state = "1";
        System.out.println("创建"+color+"棋子");
    }
    public int getX() {
        return x;
    }

    public void setXY(int x,int Y) {
        this.x = x;
        this.y = y;
    }

    public int getY() {
        return y;
    }
    public void recycle(){
        this.state = "0";
    }
    public void display(){
        System.out.println(color+"落在"+x+","+y+"位置");
    }
}
